package com.yc.ioc.test.bean1;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class App1_old {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        Student student = (Student) context.getBean("student");
        System.out.println(student);

        FileSystemXmlApplicationContext fs = new FileSystemXmlApplicationContext("classpath:beans.xml");
        Student s1 = (Student) fs.getBean("student");
        System.out.println(s1);

    }
}
